// @FileName  :test.c
// @Time      :2024/2/29 21:09
// @Author    :YKW
//# include <bits/stdc++.h>
//using namespace std;
# include <stdio.h>
# include <stdlib.h>
# include <math.h>
# include <string.h>
# include <stdlib.h>

void solve() {
    FILE *fp1, *fp2;
    char ch;
    char prevCh = '\0', in[50], out[50];
    fp1 = fopen("fcopy.in", "r");
    fp2 = fopen("fcopy.out", "w");
    while ((ch = fgetc(fp1)) != EOF) {
        if (ch == ' ' || ch == '\t') {
            if (prevCh != ' ' && prevCh != '\t') {
                fputc(' ', fp2);
            }
        } else {
            fputc(ch, fp2);
        }
        prevCh = ch;
    }
    fclose(fp1);
    fclose(fp2);
}

void main() {
    int t = 1;
    //scanf("%d", &t);
    while (t--) solve();
    return 0;
}